<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page import="java.util.Date"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<c:set var="date" value="<%=new Date()%>" />
<fmt:formatDate var="today" value="${date }" type="date"
	pattern="yyyy-MM-dd HH:mm:ss" />
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- -------------------------------------------------------------------------------------- -->
<script type="text/javascript">
	$(document).ready(function() {
		$("#modifyBtn").click(function() {
			saveModifyBoard();
		});
		$("#cancleBtn").click(function() {
			openMainBoard();
		});
	});

	function saveModifyBoard() {
		$("#saveModifyForm").submit();
		alert();
	}
	function openMainBoard() {
		$("#openMainBoard").submit();
	}
</script>
<!-- -------------------------------------------------------------------------------------- -->
<title>modifyView</title>
</head>

<body>
	<form id="saveModifyForm" name="saveModifyForm"
		action="/${initParam.context_root }/modify.do" method="post">
		<input type="hidden" id="regDate" name="regDate" value="${today }">
		<input type="hidden" id="num" name="num" value="${board.num }">
		${message }
		<table>
			<tr>
				<td>작성자</td>
				<td><input type="text" id="regName" readonly="readonly" name="regName" size="50" value="${board.regName }"></td>
			</tr>
			<tr>
				<td>제목</td>
				<td><input type="text" id="subject" name="subject" size="90" value="${board.subject }"></td>
			</tr>
			<tr>
				<td>내용</td>
				<td><textarea id="content" name="content" cols="70" rows="30">${board.content }</textarea></td>
			</tr>
		</table>
		<div align="right">
			<button id="modifyBtn" title="수정완료">수정완료</button>
		</div>
	</form>
<%-- 	<form id="openBoardForm" name="openBoardForm"
		action="/${initParam.context_root }/mainBoard.do" method="post">
		<div align="right">
			<button id="cancleBtn" title="취소">취소</button>
		</div>
	</form> --%>
</body>
</html>